package demo;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@EqualsAndHashCode
@Data
public class DemoData {
    @ExcelProperty("学生姓名")
    private String name;
    @ExcelProperty("证件号码")
    private String id;
    @ExcelProperty("出生日期")
    private String data = null;

    public void setData() {
        String year = id.substring(6,10);
        String mouth = id.substring(10, 12);
        String day = id.substring(12, 14);
        String data = year + "-" + mouth + "-" + day;
        this.data = data;
    }
}